Recognize .htm files as HTML#9360
Recognize .htm files as HTML#9360Abdalla-Eldoumani wants to merge 1 commit intowarpdotdev:masterfrom
Conversation
|
I'm starting a first review of this pull request. You can follow along in the session on Warp. I approved this pull request. No matching stakeholder was found for the changed files, so no human reviewers were requested. Comment I approved this pull request and requested human review from: @vorporeal, @alokedesai, @zachbai. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR maps .htm extensions to the existing HTML language entry and adds regression coverage for both .html and .htm filenames.
Concerns
- None found in the changed lines.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
There was a problem hiding this comment.
Overview
This PR updates language detection so files ending in .htm resolve to the existing HTML language support, and adds a unit test covering both .html and .htm.
Concerns
- No blocking correctness, security, error-handling, or performance concerns found in the changed lines.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
Description
language_by_filenameincrates/languages/src/lib.rsrecognizes.htmlbut not the legacy three-character.htmextension..htmis widely produced by static-site generators and historical web tooling (DOS 8.3 filename limits), and is already treated as an HTML/text file elsewhere in the codebase: seeis_development_text_extensionincrates/warp_util/src/file_type.rs:225, which lists"html" | "htm"together.Opening a
.htmfile in Warp's editor today shows "Language support is unavailable for this file type" instead of HTML syntax highlighting. This PR resolves the inconsistency.Testing
html_extensions_resolve_to_htmlincrates/languages/src/lib_tests.rscovering both.htmland.htm. The test callslanguage_by_filename(Path::new("index.htm"))and assertsdisplay_name() == "HTML"; fails on master, passes after the change.cargo fmt -p languages -- --checkpasses locally.Agent Mode
Changelog Entries for Stable
CHANGELOG-IMPROVEMENT: HTML files using the .htm extension now open with HTML syntax highlighting in Warp's editor.